Skip to content

x1439 client - [PR] Treatment type on the SGP management page to help breakdown the worfklows#1194

Open
yoldas wants to merge 50 commits into
develfrom
x1439-treatment-type-on-the-sgp-management-page-to-help-breakdown-the-worfklows
Open

x1439 client - [PR] Treatment type on the SGP management page to help breakdown the worfklows#1194
yoldas wants to merge 50 commits into
develfrom
x1439-treatment-type-on-the-sgp-management-page-to-help-breakdown-the-worfklows

Conversation

@yoldas
Copy link
Copy Markdown
Member

@yoldas yoldas commented May 7, 2026

Changes proposed in this pull request

  • Add treatment type fragments, mutations, and update queries (core and client branches have slightly different timelines; hence a few cherry picks for client - SDK to be rebuilt again at merge)
  • Add treatment types multi-select to Allocate a new SGP number in SGP Management page
  • Add treatment types to the success message
  • Add treatment types column to work allocation table in SGP Management page
  • Show treatment types as either blue (enabled) or red (disabled) pills in the table cell
  • Add treatment types to Records for SGP management spreadsheet download (enabled and disabled)
  • Add treatment types tab to Configuration page

User feedback: Treatment types should appear after Work Type
(except configuration page tab; they are in alphabetical order)

Not included: "Editable on the final SGP tracking page (later story)"

Miscellaneous:

  • Update several existing tests. The main update is clearing text before input. Discovered in debugging that tests are not well isolated and input fields accumulate entries across tests. The other main update is async. waitFor to avoid timeout errors. There are also some fixes for false-positives, particularly in releaseOptions tests.
  • Update cypress container image to 22.14.0 . It is multi-browser version, because chrome-only versions are no longer provided for node 22+ . Chrome version 134 is used for tests.
  • Fix the issue in Config page for Treatment Types only: after in-client-app navigation, the options set previously look reset.
  • Add unit tests at component and page level with mocks.
  • No guards agains null or undefined treatment types; assumed empty array.

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

@yoldas yoldas force-pushed the x1439-treatment-type-on-the-sgp-management-page-to-help-breakdown-the-worfklows branch from a81e95b to 2ad595d Compare May 12, 2026 23:26
yoldas added 23 commits May 14, 2026 04:23
…ment types config, to prevent showing incorrect config values after navigation within the app
…es, flat/flatMap, Promise, etc.) in Cypress tests so TypeScript/IDE no longer reports missing lib typings for those APIs
@yoldas yoldas marked this pull request as ready for review May 14, 2026 17:26
@yoldas yoldas requested review from khelwood and sabrine33 May 14, 2026 17:33
image: cypress/browsers:node18.12.0-chrome106-ff106

options: --user 1001
image: cypress/browsers:node-22.14.0-chrome-134.0.6998.165-1-ff-136.0.3-edge-134.0.3124.85-1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave this for a separate PR and handle the Node upgrade there, including upgrading the build Node version as well as the github actions versions

At the moment, the tests are running with a different Node version from the one used to build the image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test use the version from .nvmrc which is 22.14.0 and that matches this image version.
I will still extract the change to another PR as you asked.

.then((res) => {
// revalidate route loader so the configuration page sees server-side updates
try {
revalidator.revalidate();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean the server response by 'the server-side updates'?

mockCreateObjectURL();

// Mock URL.createObjectURL for jsdom environment
mockCreateObjectURL();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is called twice

// treatment type pills rendered in the treatment cell
// find pill spans anywhere in the row
const allSpans = row!.querySelectorAll('span');
const pillSpans = Array.from(allSpans).filter((p) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're using a component specifically for test assertions, the convention is to add a data-testid attribute so it can be reliably selected and tested. This makes it easier to target elements in tests without relying on CSS classes or DOM structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants